package io;

import java.io.*;

public class FileCopyDemo03 {
    public static void main(String[] args) throws IOException {
      BufferedInputStream bis =
              new BufferedInputStream(
                      new FileInputStream("src/io/FileCopyDemo03.java")
              );

        BufferedOutputStream bos =
                new BufferedOutputStream(
                        new FileOutputStream("src/io/FileCopyDemo03.java")
                );

        byte[] data = new byte[16];
        int len = 0;
        while ((len = bis.read(data)) != -1) {
            bos.write(data, 0, len);
        }
        bos.flush();
        bis.close();
        bos.close();
    }
}
